package com.erp.order.purchasing.model;

import com.erp.hr.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * 采购审核 实体类
 * @Author: syz
 * @blame syz
 * @CreateTime: 2021/4/6
 */
@Data
@Entity
@DynamicInsert()
@DynamicUpdate()
@EqualsAndHashCode(callSuper = true)
@Table(name="purchasing_audit", schema="erp")
public class PurchasingAudit extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 流程id
     */
    @Column(name = "process_instance_id")
    private String processInstanceId;

    /**
     * 编号
     */
    @Column(name = "code")
    private String code;

    /**
     * 计划类型
     */
    @Column(name = "type")
    private String type;

    /**
     * 部门代码
     */
    @Column(name = "department_code")
    private String departmentCode;

    /**
     * 采购员
     */
    @Column(name = "buyer")
    private String buyer;

    /**
     * 状态
     */
    @Column(name = "status")
    private String status;

    /**
     * 提交的id
     */
    @Transient
    private Long subId;

    /**
     * 提交的id集合
     */
    @Transient
    private List<Long> subIds;

    /**
     * 详情
     */
    @Transient
    private List<PurchasingRequisition> subs;
}